# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=libkipi
pkgver=20.04.3
pkgrel=0
pkgdesc="KDE Image Plugin Interface library"
arch="all !armhf" # armhf blocked by extra-cmake-modules
url="https://www.digikam.org/"
license="GPL-2.0-or-later AND LGPL-2.0-or-later"
depends_dev="qt5-qtbase-dev kconfig-dev kxmlgui-dev kservice-dev"
makedepends="$depends_dev extra-cmake-modules"
source="https://download.kde.org/stable/release-service/$pkgver/src/libkipi-$pkgver.tar.xz"
subpackages="$pkgname-dev"
options="!check" # Test suite fails to compile

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_TESTING=OFF
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}
sha512sums="0cd89507fcebacf64c69665e7d2e1c780f478c1234e714b4db0823aced184bc274ed363f78983e44c6e28e4654dbf8ba6792aec0225065e516749b381a8fed28  libkipi-20.04.3.tar.xz"
